package org.dolphin.service;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;
import org.dolphin.base.bean.FlatProductAttributeVO;
import org.dolphin.base.bean.FlatProductItemSearchVO;
import org.dolphin.base.bean.FlatProductItemVO;
import org.dolphin.base.bean.FlatProductVO;
import org.dolphin.base.bean.ProductAttributePriceVO;
import org.dolphin.base.bean.ProductAttributeVO;
import org.dolphin.base.bean.ProductCategoryVO;
import org.dolphin.base.bean.ProductVO;
import org.dolphin.entity.inventory.Product;
import org.dolphin.entity.inventory.ProductAttribute;
import org.dolphin.entity.inventory.ProductCategory;
import org.hibernate.criterion.Order;

public interface ProductService {
  public void createProduct(Product product);

  public void createProductAttribute(ProductAttribute productAttribute);

  public void createProductCategory(ProductCategory category);

  public Product fetchProduct(Serializable id);

  public ProductAttribute fetchProductAttribute(Serializable id);

  public ProductCategory fetchProductCategory(Serializable id);

  public ProductVO getProduct(Serializable id);

  public ProductAttributeVO getProductAttribute(Serializable id);

  public List<FlatProductAttributeVO> getProductAttributes(Serializable productId, int page,
      int rows, List<Order> orders);

  public Long getProductAttributesCount(Serializable productId);

  public List<ProductCategoryVO> getProductCategories(int page, int rows, List<Order> orders);

  public Long getProductCategoriesCount();

  public ProductCategoryVO getProductCategory(Serializable id);

  public List<FlatProductItemVO> getProductItems(int page, int rows, List<Order> orders);

  public Long getProductItemsCount();

  public List<FlatProductItemSearchVO> getProductItemSearch(int page, int rows, List<Order> orders);

  public Long getProductItemSearchCount();

  public List<FlatProductVO> getProducts(int page, int rows, List<Order> orders);

  public Long getProductsCount();

  public Product loadProduct(Serializable id);

  public ProductAttribute loadProductAttribute(Serializable id);

  public ProductCategory loadProductCategory(Serializable id);

  public ProductAttributePriceVO lookupProductAttributePrice(ProductAttribute productAttribute,
      Date priceItemDate);

  public void updateProduct(Product product);

  public void updateProductAttribute(ProductAttribute productAttribute);

  public void updateProductCategory(ProductCategory category);
}
